TARGET=demo
CXX=g++

CXXFLAGS= -O3 -Wall \
       -std=c++11 \
       -I/usr/local/include \
       -I/usr/local/include/opencv \
       -I/home/darknet_face_with_landmark/include \
       -I/home/SphereFace/tools/caffe-sphereface/include \
       -I/home/SphereFace/tools/caffe-sphereface/build/src \
       -I/usr/local/cuda/include \
       -I/home/curl-7.72.0/include
       
CXXLIBS= \
      -L/usr/lib \
      -L/usr/local/lib \
      -L/usr/lib/x86_64-linux-gnu \
      -L/usr/local/lib64 \
      -lopencv_core -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc \
      -lavformat -lavcodec -lavutil -lswresample -lswscale -pthread \
      -lhttpserver -lmicrohttpd \
      -L/home/darknet_face_with_landmark -ldarknet \
      -L/home/SphereFace/tools/caffe-sphereface/build/lib -lcaffe -lglog -lprotobuf \
      -L/home/curl-7.72.0/lib/.libs -lcurl


SRCS=$(wildcard ./src/*.cpp)
OBJS=$(SRCS:.cpp=.o)


all: $(TARGET)

$(TARGET): $(OBJS)
	$(CXX) -o $@ $^ $(CXXFLAGS) $(CXXLIBS)


clean:
	rm -rf src/*.o $(TARGET)

.PHONY: clean
